package edu.gdkm.abstractdemo2;
//Secretary的工资则是按小时计费的。
public class Secretary extends Employee {
    private double hourlyRate;  
    private int hoursWorked;  
  
    public Secretary(String name, String gender, int age, double hourlyRate, int hoursWorked) {  
        super(name, gender, age);  
        this.hourlyRate = hourlyRate;  
        this.hoursWorked = hoursWorked;  
    }  
  
    @Override  
    public double salary_count() {  
        return hourlyRate * hoursWorked;  
    }  
}